home *** CD-ROM | disk | FTP | other *** search
/ Amiga Mag HDD Backup / Amiga Mag HDD Backup.zip / Amiga Mag HDD Backup / Alexander.img.bin / Alexander.img / AOL Files / More AOL Files.sit / Mail may 1995 Archive.sit / 5_24_95 / Amiga23.txt < prev    next >
Text File  |  1995-05-24  |  50KB  |  1,180 lines

  1. Path: newsbf01.news.aol.com!newstf01.news.aol.com!uunet!usc!howland.reston.ans.net!xlink.net!zib-berlin.de!news.uni-ulm.de!news.belwue.de!news.belwue.de!news.uni-stuttgart.de!uni-regensburg.de!fauern!lrz-muenchen.de!informatik.tu-muenchen.de!kellerer
  2. From: kellerer@informatik.tu-muenchen.de (Ignaz Kellerer)
  3. Newsgroups: comp.sys.amiga.introduction,comp.sys.amiga.misc,comp.sys.amiga.programmer,comp.answers,news.answers
  4. Subject: Amiga FAQ (Frequently asked questions) (Part 2 of 3)
  5. Supersedes: <AmigaFAQ-2-796406468@informatik.tu-muenchen.de>
  6. Followup-To: comp.sys.amiga.introduction
  7. Date: 23 May 1995 16:00:33 GMT
  8. Organization: InternetNews at TUM, Technical University of Munich, Germany
  9. Lines: 1156
  10. Approved: news-answers-request@MIT.edu
  11. Distribution: world
  12. Expires: Saturday, 10 Jun 95 18:00:25 MESZ
  13. Message-ID: <AmigaFAQ-2-801244825@informatik.tu-muenchen.de>
  14. References: <AmigaFAQ-1-801244825@informatik.tu-muenchen.de>
  15. Reply-To: kellerer@informatik.tu-muenchen.de (Ignaz Kellerer)
  16. NNTP-Posting-Host: hphalle5h.informatik.tu-muenchen.de
  17. Content-Type: text/plain; charset=ISO-8859-1
  18. Content-Transfer-Encoding: 8bit
  19. Summary: Frequently asked questions on the Amiga.
  20.          New users should read this!
  21. Originator: kellerer@hphalle5h.informatik.tu-muenchen.de
  22. Xref: newsbf01.news.aol.com comp.sys.amiga.introduction:2726 comp.sys.amiga.misc:37627 comp.sys.amiga.programmer:25606 comp.answers:8614 news.answers:27809
  23.  
  24. Posted-By: auto-faq 2.4
  25. Archive-name: amiga/introduction/part2
  26. Last-modified: Tuesday, 23. April 1995
  27. Posting-Frequency: biweekly
  28.  
  29.  
  30.     Frequently asked questions (FAQ) concerning the Amiga. [2/3]
  31.     ------------------------------------------------------------
  32.  
  33. This is the second part of the Amiga-FAQ. It is in Ascii format to be
  34. easily read by everyone. It is also available in AmigaGuide, Dvi and
  35. html (for WWW servers) format as part of the Amiga-FAQ archive.
  36. (File docs/misc/AmigaFAQ.lha on any Aminet site)
  37.  
  38. Please note the following:
  39.  
  40.   - Changes since the last posting are marked with a
  41.     !    changed this line/section, respectively
  42.     +    added this line
  43.     <    removed something before this line
  44.  
  45.   - An index is at the bottom of this part. If this still doesn't help:
  46.     E-mail me, probably I can include an answer into the FAQ.
  47.  
  48.   - Suggestions, contributions, critics and beer bottles are very
  49.     welcome. :-) Send them to:
  50.  
  51.         Ignaz Kellerer
  52.         Georg-Habel-Str. 11
  53.       81241 Muenchen (Germany)
  54.         Tel. (+49) 089 / 885147
  55.  
  56.         Internet: kellerer@informatik.tu-muenchen.de
  57.  
  58. ===========================(Cut here)=========================================
  59.  
  60.  
  61.   Disclaimer
  62.  
  63.   1 CPU, Custom chips, RAM and other stuff
  64.     1 What are the 68EC020 and the 68EC030?
  65.     2 What's an FPU?
  66.     3 Can I use a 3.5' HD in my A1200?
  67.  
  68.   2 The Operating System
  69.     1 Can I use another Kickstart than the builtin?
  70.     2 What is the Amiga equivalent of . (Current directory)?
  71.     3 The PIPE: queue-handler
  72.       1 Using PIPE: in a standard AmigaShell environment
  73.       2 The Pipe command
  74.       3 Pipe command support in AmigaShell
  75.       4 Quick usage guide
  76.       5 Related things
  77.       6 Troubleshooting
  78.  
  79.   3 How about Graphics?
  80.     1 What are chunky and planar displays?
  81.     2 What is doublebuffering?
  82.     3 What monitors will work on my Amiga 1200/4000?
  83.     4 How do I switch between PAL and NTSC?
  84.  
  85.   4 Programming
  86.     1 What documentation do I need as an Amiga programmer?
  87.     2 What is CATS?
  88.     3 Where do I get the Amiga includes?
  89.     4 How do I become a developer?
  90. !   5 What compilers (assemblers) are there?
  91.     6 Those never working Esc sequences!
  92.     7 Is it possible to use AmigaBasic on the A1200?
  93.     8 How do I localize my program?
  94.     9 How to obtain a pointer to a console's window
  95.     10 What are pragmas?
  96.     11 My Compiler/Linker is complaining about missing symbol xxx.
  97.     12 Where do I find the function xxx?
  98.     13 The GNU C compiler: general information and installation
  99.       1 Current Version
  100.       2 Requirements
  101.       3 Authors
  102.       4 Sources for Gcc
  103.       5 Inline Headers
  104.       6 Amiga Libraries
  105.       7 Installation
  106.       8 Compiling
  107.       9 How to get help
  108.  
  109.   5 Applications
  110.     1 Text Editors
  111.     2 What word processors are there?
  112.     3 Desktop Publishing
  113.     4 What is TeX and where can I get it?
  114.     5 Are there any Postscript interpreters?
  115.       1 Amiga Font Formats
  116.       2 Frequently Requested Amiga Fonts
  117.       3 Commercial Font Sources
  118.       4 Non-Latin fonts on the Amiga
  119.       5 Amiga Font Installation
  120.       6 Amiga Font Utilities
  121.       7 Making Outline Fonts
  122.       8 Problems and Possible Solutions
  123.     6 How to deal with Non-Latin texts?
  124.       1 Japanese editors and viewers
  125.       2 Chinese text viewers
  126.  
  127.   6 Emulators
  128.     1 Can I run Unix on my Amiga?
  129.     2 Is it possible to use the Amiga as X11 terminal?
  130. !   3 Is there a way to start MS-Dos programs?
  131.     4 How to mount MsDos-formatted Syquests on Amiga
  132.  
  133.   7 Miscellaneous
  134.     1 Is there any unix version of LhA?
  135.     2 What are files ending with ...?
  136.     3 Is there a Stacker-like utility to pack my hard drive?
  137.     4 Where do I get Fish disk xxx?
  138.     5 What is MUI and where do I find it?
  139.  
  140.   8 Where and how do I get software and other informations?
  141.     1 Files and databases on freely distributable software
  142.     2 A collection of tests
  143.     3 Getting files from a FTP server
  144.     4 Getting files from a Mail server
  145.     5 Getting files from a mailbox
  146.     6 The Fish PD series
  147.       1 The Amiga Library disks
  148.       2 The Fresh Fish CD-Roms
  149.     7 How do I Read and write MS-Dos disks?
  150.     8 How do I split large files?
  151.     9 Discussing things
  152.     10 Other FAQ's
  153.  
  154.   The Amiga-FAQ archive
  155.  
  156.   Contributions
  157.  
  158.   Credits
  159.  
  160. ! Index
  161.  
  162.  
  163.  
  164.   4 Programming
  165.   *************
  166.   
  167.      This chapter handles problems arising for programmers and
  168.   compiler-users only.
  169.   
  170.   4.1 What documentation do I need as an Amiga programmer?
  171.   ========================================================
  172.   
  173.      The best information available are the RKMs (ROM Kernel Manuals), 3rd
  174.   edition, by Commodore, published by Addison-Wesley:
  175.        The Amiga ROM Kernel Manual:  Libraries, ISBN 0-201-56774-1
  176.        The Amiga ROM Kernel Manual:  Devices, ISBN 0-201-56775-X
  177.        The Amiga ROM Kernel Manual:  Includes and Autodocs, ISBN
  178.                                                             0-201-56773-3
  179.        The Amiga Hardware Manual, ISBN 0-201-56776-8
  180.        The Amiga User Interface Style Guide, ISBN 0-201-57757-7
  181.   
  182.   Especially the RKM: Libraries is a must. The RKM: Includes and Autodocs
  183.   isn't that much worth: Better get the same stuff on disk instead to
  184.   have it online.  See Includes.
  185.   
  186.      AmigaDOS isn't included in these books. The Autodocs give much
  187.   information, but to go deeper you probably need
  188.        The AmigaDOS Manual, 3rd Edition, ISBN 0-553-35403-5
  189.      published by Bantam Books.
  190.   
  191.      A better choice for developers is
  192.        The Amiga Guru Book
  193.   
  194.   by Ralph Babel. The book starts with a survey on different aspects of
  195.   programming the Amiga. (About 250 pages) Useful for beginners are the
  196.   sections on the Amiga's data types (not to be confused with the 3.x
  197.   DataTypes used by MultiView, for example), the Includes and the
  198.   amiga.lib. But even experienced programmers will find useful things
  199.   here that are missing in the RKMs.  But the largest part are about 500
  200.   pages on AmigaDOS and, as I think, the most important, because AmigaDOS
  201.   is the worst officially documented part of the OS. The book is rather
  202.   concise and hence not as easy to read as the RKMs, but I recommend it
  203.   as an addition and instead of the AmigaDOS manual.  (Not, however, a
  204.   replacement for the Libraries and Devices, which aren't covered here.)
  205.   Unfortunately the book has no ISBN and is available in special stores
  206.   only. But there are some mail order companies which offer it for about
  207.   50$ and which accept credit cards:
  208.   
  209.                                    Almathera Systems Limited
  210.                                    Southerton House
  211.        NBG USA, Inc.               Boundary Business Court
  212.        482 Holly Avenue            92-94 Church Road
  213.        St. Paul, MN 55102          Mitcham, Surrey CR4 3TD
  214.        USA                         England
  215.        Voice: +1 (612) 290 9447    Voice: +44 181 687 0040
  216.        Fax:   +1 (612) 290 9449    Fax:   +44 181 687 0490
  217.                                    E-Mail: <almathera@cix.compulink.co.uk>
  218.        
  219.                                    Stefan Ossowskis Schatztruhe
  220.        Hirsch & Wolf OHG           Gesellschaft fⁿr Software mbH
  221.        Mittelstra▀e 33             Veronikastra▀e 33
  222.        D-56564 Neuwied             D-45131 Essen
  223.        Germany                     Germany
  224.        Voice: +49 (2631) 8399-0    Voice: +49 (201) 788778
  225.        Fax:   +49 (2631) 8399-31   Fax:   +49 (201) 798447
  226.                                    E-Mail: <stefano@tchest.e.eunet.de>
  227.        
  228.        Someware
  229.        27 rue Gabriel PΘri
  230.        59186 Anor
  231.        France
  232.        Voice: +33 27596000
  233.        Fax:   +33 27595206
  234.        E-Mail: <didierj@swad.someware.com>
  235.      See FAQs.
  236.   
  237.   4.2 What is CATS?
  238.   =================
  239.   
  240.      This is a department at Commodore West Chester which was formerly
  241.   named `Commodore Amiga Technical Support' and was later renamed
  242.   `Commodore Application and Technical Support'. These are people that
  243.   work independently of Engineering, but close together with them, and try
  244.   to help developers outside of Commodore to create nice Amiga
  245.   applications, software or hardware. To achieve this, CATS has gathered
  246.   a lot of informations and tools, on floppy, CD, or paper. Much of this
  247.   material is also available to the general public. (1) But don't mix
  248.   this up with some sort of Hotline for everyone!
  249.   
  250.      For Americans the address to get this material is
  251.            CATS
  252.            Commodore Electronics Limited
  253.            950 Rittenhouse Road
  254.            Norristown, PA 19403
  255.   
  256.   for all Europeans it's a company in Germany:
  257.            Fa. Hirsch & Wolf
  258.            Mittelstr. 33
  259.            56564 Neuwied
  260.            Tel. 02631/83990
  261.   
  262.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.com
  263.   
  264.      ---------- Footnotes ----------
  265.   
  266.      (1)  Which means: For Non-Developers.
  267.   
  268.   4.3 Where do I get the Amiga includes?
  269.   ======================================
  270.   
  271.      The only legal way to get the includes and autodocs (and you *should*
  272.   get them, they are *very* useful!) is to become a developer (see
  273.   Developer) or to buy the `NDU' (Native developers update kit, also
  274.   known as `NDUK' or `NDK'), which is offered by CATS. They cost about
  275.   30$ plus shipping and this seems to me to be a fair price. See CATS.
  276.   The current version is 3.1.
  277.   
  278.      If you need only the includes, you could get them as well with a
  279.   compiler (commercial compilers only) or by getting the Fresh Fish CD.
  280.   See Fish CD.
  281.   
  282.   4.4 How do I become a developer?
  283.   ================================
  284.   
  285.      You need the `ADSP' (Amiga Developer Support Program) documents. To
  286.   get this write a letter to your local Commodore branch asking for these
  287.   documents.  Everything else should be explained there. The german
  288.   address (for the US address see CATS) is
  289.            Commodore
  290.            Lyoner Strasse 38
  291.            60528 Frankfurt
  292.      There are three different developer versions:
  293.   *Registered*
  294.        developers get access to the CBMNET (kind of a Commodore-internal
  295.        Usenet), which makes it possible to discuss problems with other
  296.        developers, Commodore engineers included. Registered developers
  297.        pay about US$80 per year, plus initial US$30 initially.
  298.   
  299.   *Certified*
  300.        developers seem to me the most interesting claass: They have the
  301.        possibility copy the most beta versions of the system software
  302.        (Kickstart and Workbench) and the respective Includes and
  303.        AutoDocs. (Not all beta versions and especially no beta hardware.)
  304.        You pay about US$250 per year plus US$50 initially for this.
  305.   
  306.   *Commercial*
  307.        developers finally have in most details the same as certified
  308.        developers, but may expect to get more beta versions and sooner,
  309.        included beta hardware (This has *not* always been so in the
  310.        past.), hencethey pay about US$400 plus US$50 initially.
  311.   
  312.   The above describes the prices and the situation in Germany and might be
  313.   different elsewhere. Especially not all Commodore branches offer the
  314.   registered status. A hint is to build a group of users and become a
  315.   developer group, so the costs are reduced.
  316.   
  317.      All developers have to sign non-disclosure agreements (`NDA') which
  318.   specify that we may not discuss information outside of authorized areas
  319.   even to other developers until given explicit permission by Commodore.
  320.   
  321. ! 4.5 What compilers (assemblers) are there?
  322. ! ==========================================
  323.   
  324.      There is a lot of programming languages on the Amiga, commercial as
  325.   well as freely distributable. I will enumerate only those that I know
  326.   or which seem it worth to me otherwise.
  327.   
  328.   *Assembler*
  329.        All C-compilers have an Assembler included. Freely distributable
  330.        are A68K and PhxAss (directory `dev/asm' on Aminet or Fish disks
  331.        521 and 906)
  332.   
  333. +      Commercial Assemblers are MaxonASM, OMA3.0 and DevPack3.14.
  334. + *Basic*
  335. +      The following commercial Basic-compiler/interpreter are available:
  336. +      BlitzBasic2, Amos and MaxonBasic3.
  337.   *C*
  338.   *C++*
  339.        Freely distributable C-compilers are `gcc' (which has its own
  340.        directory `dev/gcc' on Aminet) and the evaluation version of
  341.        `Dice' (for example per FTP from `ftp.uni-paderborn.de', directory
  342.        `/news/comp.binaries.amiga/volume91/languages' or on Fish disk
  343.        491).  The advantage of gcc is that you find gcc versions all over
  344.        the world and on all computer systems. Another advantage is that
  345.        C++ is included into gcc! But it is slow and needs 4Mb of RAM or
  346.        more.  See The GNU C compiler.  See Mailing lists.
  347.   
  348. !      Commercial C compilers are `Aztec-C', `Dice', `SAS/C' amd
  349. !      `MaxonC++'.  `Aztec-C' doesn't seem to get further development any
  350. !      more.  It should be remarked that the commercial compilers have
  351. !      especially wonderful debugging utilities (Source level debuggers!)
  352. !      that the others are missing.
  353.   
  354. !      SAS has announced to drop support of the Amiga-Compiler, too, due
  355. !      to the Amiga's bad situation. However, the compiler is still
  356.        available and up-to-date and has a crosscompiler included, which
  357.        translates C++ to C and supports the source level debugger too.
  358.        Considering the price of just 99$ for students and updates from
  359.        recent versions or other compilers it is still the most
  360.        recommendable of the three. In europe the compiler is available
  361.        from
  362. !               SAS Institute, Inc.           SAS Institute Gmbh
  363. !               Book Sales                    PO Box 10 53 40
  364. !               SAS Campus Drive              69043 Heidelberg
  365. !               Cary, NC 27513                Germany
  366. !               USA
  367.             
  368. !               Phone: (919)677-8000          Phone: (49)6221-4160
  369. !               EMail: sasdsb@vm.sas.com      EMail: eurdoc2@vm.sas.com
  370.   
  371.        Dice is the cheapest and fastest commercial compiler. The greatest
  372.        disadvantage of Dice (compared to the other commercial compilers)
  373.        is the so-called Source-Line-Debugger: This means that you see the
  374.        current line of source and can execute the program step by step,
  375.        like with the other debuggers. On the other hand you can examine
  376.        memory only, not the variables.  To get information about DICE,
  377.        send email to info@oic.COM. An automatic system will return
  378.        complete details, including upgrade prices.
  379.   
  380.        Comeau C++ is a crosscompiler like SAS/C++. That wouldn't be a
  381.        problem, but Comeau C++ doesn't have a C compiler included.  You
  382.        need SAS/C, Aztec-C or Dice additionally. But it is AT&T cfront 3.0
  383.        compliant and supports exceptions. And like gcc it runs on many
  384.        platforms.  Maxxon C++ is offered in Germany. I cannot say
  385.        anything on it. Both compilers are commercial. Comeau's address is:
  386.                 Comeau computing
  387.                 91-34, 120th Street
  388.                 Richmond Hill, NY, 11418-3214
  389.                 USA
  390.             
  391.                 EMail: Greg Comeau, comeau@bix.com
  392.   
  393. +      Maxon C++ is both a C++ and a C compiler. There is a light version
  394. +      and a developer version. The developer version matches the AT&T
  395. +      standard 3.0.  Maxon-light includes a compiler and a editor.
  396. +      Developer includes a source level debugger, Amiga classes library
  397. +      and Hot Help with documentation to the amiga libs.  It is a german
  398. +      product, and compiler and documentation are german.  The compiler
  399. +      has some little bugs, but you can work with it well, anyway.
  400.   *Forth*
  401.        JForth is said to be an excellent Amiga port of Forth. Among its
  402.        advantages are object oriented extensions, full Amiga interface
  403.        and an application generator. It is available from:
  404.                 Delta Research
  405.                 P.O. Box 151051
  406.                 San Rafael, CA   94915-1051
  407.             
  408.                 Phone: (415) 453-4320
  409.                 EMail: Phil Burk, phil@ntg.com
  410.                        Mike Haas, haas@starnine.com
  411.   
  412.   *Fortran*
  413.        (Sigh! Still people who need it :-<) Freely distributable are BCF
  414.        (Fish disk 470) and f2c, a Fortran to C converter (Aminet,
  415.        directory `/dev/lang'). A commercial compiler is offered from
  416.        ABSoft. All these are Fortran 77 compilers, I don't know any
  417.        Fortran 90 compiler on the Amiga.
  418.   
  419.   *Lisp*
  420.        Freely distributable Lisp interpreters are XLisp (Fish disk 181)
  421.        and OakLisp (Fish disks 519 and 520) and CLISP
  422.        (`/pub/lisp/clisp/binaries/amiga' at the server `ftp
  423.        ma2s2.mathematik.uni-karlsruhe.de'). Lisp compilers are Gambit
  424.        (Fish 764 and 765) and Scheme-to-C (Fish disks 556, 557 and 558).
  425.        See Mailing lists.
  426.   
  427.   *Prolog*
  428.        `/dev/lang/UNSWProlog.lha' and `dev/lang/sbp3_1e.lha' on Aminet as
  429.        well as `SBProlog' on Fish disk 141 and `SBProlog' on Fish disk
  430.        145 are freely distributable Prolog interpreters.
  431.   
  432.   *Modula-2*
  433.        M2Amiga is offered in Europe, Benchmark Modula-2 in the U.S. Both
  434.        are said to be very good, have a powerful source-level-debugger, a
  435.        large library.  Especially M2Amiga has great support by a german
  436.        user-group (AMOK) which for example offers own PD disks. See
  437.        Mailing lists.
  438.   
  439.        M2Amiga is offered by:
  440.                 A+L AG
  441.                 Daderiz 61
  442.                 2540 Grenchen
  443.                 Schweiz
  444.             
  445.                 Tel.: +41/65/52 03-11
  446.                 Fax:              -79
  447.   
  448.        Benchmark Modula-2 is available from:
  449.                 Armadillo Computing
  450.                 5225 Marymount Drive
  451.                 Austin, Texas 78723
  452.                 USA
  453.             
  454.                 Phone/FAX: 512/926-0360.
  455.                 EMail: Jim Olinger, jolinger@bix.com
  456.   
  457.   *Oberon*
  458.   *Oberon-2*
  459.        Two compilers (both Oberon-2) are available: AmigaOberon
  460.        (commercial) is offered by the same company as M2Amiga. It is
  461.        integrated into a full developers environment and has a large
  462.        library of modules.  Library linker and  source level debugger are
  463.        available.
  464.   
  465.        Oberon-A is a Freeware compiler. (Source: Aminet, `dev/obero'
  466.        directory) However, this is a beta release, especially the module
  467.        library is limited. See Mailing lists.
  468.   
  469.        The AMOK user group supports AmiOberon as well as M2Amiga.
  470.   
  471.        In addition to these two standalone compilers which are thought
  472.        mainly for creating AmigaOS applications, there is an Amiga port of
  473.        the Oberon Sytem V4, too. The Oberon System is implemented as an
  474.        AmigaOS-Task using a separate screen and includes an Oberon-2
  475.        compiler. You can use it to write software that will work on all
  476.        implementations of the Oberon System V4 (for example Macintosh,
  477.        Windows or Sparc) without any changes.
  478.   
  479.   *Pascal*
  480.        There is a PD-compiler called PCQ (Directory `dev/lang' on Aminet
  481.        or Fish disk 511). It doesn't support all of Pascal and major
  482.        features are missing. P2C, a pascal to C converter is on disk 341.
  483.        (Aminet: `/dev/misc/p2c120.lha') Additionally there are two
  484.        commercial compilers called HiSoft Pascal and KickPascal. HiSoft
  485.        Pascal and P2C claim to be compatible to Turbo Pascal up to 5.0.
  486.        HiSoft has a source level debugger included.
  487.   
  488.   4.6 Those never working Esc sequences!
  489.   ======================================
  490.   
  491.      Many printers come with a manual that explains which Esc sequence
  492.   causes which action on the printer. But there happen weird things when
  493.   you try to send these sequences to your printer, either it does
  494.   nothing, or it does something completely different. There is a reason,
  495.   the Amiga printer drivers. These drivers are made in a way that they
  496.   only understand a certain set of `ANSI Esc sequences', not the special
  497.   ones defined (differently) by the various printer manufacturers. The
  498.   purpose is that every application on the Amiga just uses this one
  499.   standard set of control sequences and this way doesn't need to know
  500.   which printer is actually connected. The printer driver then translates
  501.   these standard sequences into the special sequences a certain printer
  502.   understands.  A list of the available ANSI Esc sequences is found in
  503.   the current Workbench manuals (or older AmigaDOS manuals). Now if you
  504.   want to issue a control sequence to the printer that's not available as
  505.   an ANSI command, you have two possibilities to achieve this:
  506.     1. Bypass the printer driver (that would unsuccessfully try to
  507.        interpret the sequence) and send your output *only* during this
  508.        sequence to `PAR:' (or `SER:', respectively). For this you have to
  509.        close and open printer output channels very often which is rather
  510.        tedious, and you have to know where (`PAR:' or `SER:') your
  511.        printer is connected.
  512.   
  513.     2. Use a special ANSI sequence, made exactly for this case:
  514.                 `Esc[<n>"<x>'
  515.        where `<n>' is the decimally typed number of bytes in the string
  516.        `<x>', which actually contains your special printer sequence. This
  517.        ANSI sequence tells the printer driver to not interpret or
  518.        translate the next `<n>' bytes.
  519.           But both methods have one big disadvantage when used in an
  520.   application program: You lose the printer independency! If you stick to
  521.   ANSI sequen- ces, you can output to any printer on earth, as long as
  522.   there is an Amiga printer driver for it. If you start to use special
  523.   control sequences, your program will be tied to this single printer
  524.   model and will not be usefull for any other (or you would have to
  525.   provide some dozen new printer drivers for your application).
  526.   
  527.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.com
  528.   
  529.   4.7 Is it possible to use AmigaBasic on the A1200?
  530.   ==================================================
  531.   
  532.      We heard conflicting reports about AmigaBasic on the A1200: While I
  533.   said that you can work sufficiently with it, others said that this
  534.   isn't possible, as AmigaBasic crashes on the slightest little error.  I
  535.   couldn't reproduce this.
  536.   
  537.      Now I can. It depends on the setting in the Sound Prefs editor. When
  538.   you activate a sound there, this conflicts with sound that AmigaBasic
  539.   tries to produce by hand and obviously not quite the correct way itself.
  540.   
  541.      Easy solution: To work with AmigaBasic on the A1200, just
  542.     1. Switch off sound output in the Sound prefs editor.
  543.   
  544.     2. On the A4000 (as well as on an A1200 with Fast Mem expansion (1))
  545.        you  additionally need to run NoFastMem.
  546.   
  547.     3. Better avoid SUBs and use conventional GOSUBs instead, then the
  548.        compatibility with newer processors will be higher.
  549.   
  550.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.co
  551.   
  552.      ---------- Footnotes ----------
  553.   
  554.      (1)  If you have a turbo board
  555.   
  556.   4.8 How do I localize my program?
  557.   =================================
  558.   
  559.      Suggest, you want to write a `HelloLocalWorld.c'. Your final program
  560.   will look like this:
  561.   
  562.            #include "HelloLocalWorld_Cat.h"
  563.            #include <clib/exec_protos.h>
  564.        
  565.            struct Library *LocaleBase;
  566.        
  567.            void main(int argc, char *argv[])
  568.        
  569.            {
  570.                /* Open the locale.library. No kill, if not successfull.
  571.                   (Just use the builtin catalog strings instead.) Note, that
  572.                   we open locale.library here, even if our compiler supports
  573.                   AutoOpening.
  574.                */
  575.                LocaleBase = OpenLibrary("locale.library", 38);
  576.                OpenHelloLocalWorldCatalogs(NULL, NULL);
  577.        
  578.                printf(GetString(MSG_Hello));
  579.        
  580.                CloseHelloLocalWorldCatalog();
  581.                if (LocaleBase) CloseLibrary(LocaleBase);
  582.            }
  583.   
  584.      The routine GetString checks, if the wished catalogs are available
  585.   and returns a pointer to either the builtin string or the catalog
  586.   string. (In my case the german string.)
  587.   
  588.      You see, the main difference besides the minor opening and closing
  589.   stuff (OpenLibrary, OpenHelloLocalWorldCatalogs, ...) (which too can be
  590.   dropped, too, with FlexCat) is to replace strings with a function call.
  591.   Hence we need a file `HelloLocalWorld_Cat.c', which holds
  592.   OpenHelloLocalWorld, GetString, CloseHelloLocalWorld and the builtin
  593.   strings (this could be an array, where
  594.                array[MSG_Hello] = "Hello, local world.\n";
  595.   
  596.   is defined) and an include file `HelloLocalWorld_Cat.h', which defines
  597.   the message ID's like MSG_Hello. You don't need to know, how these files
  598.   work internally, especially you don't need to know `locale.library'!
  599.   
  600.      There are some catalog generators (in what follows: CGs) available
  601.   (`CatComp', for devlopers only, `KitCat', german docs only, `MakeCat',
  602.   which I don't know and `FlexCat', which I  recommend, because it is
  603.   most flexible in the generated source and supports catalogs on 2.0 and
  604.   any language, even Amiga-E, Cluster, Pascal, ... and besides that: I'm
  605.   the author ;-) are tools, that create  HelloLocalWorld_Cat.h,
  606.   HelloLocalWorld_Cat.c and the real catalogs for you. (The above code
  607.   might differ slightly between the different CGs.) (See Aminet, directory
  608.   `dev/misc'.)
  609.   
  610.      Of course they need to know how to use them. First create a so-called
  611.   `catalog-description' file. This could look like this:
  612.            ; Lines beginning with a semicolon are comment lines.
  613.            # language english
  614.            ; the language of the builtin strings
  615.            # version 0
  616.            ; the catalog version (0 = any)
  617.            MSG_Hello (1/15/30)
  618.            Hello, local world
  619.   
  620.   Any string is defined by a line like the last two lines above: MSG_Hello
  621.   is the message-ID, (1/15/30) says, that the value of MSG_Hello should be
  622.   1 (you may omit this, in which case just the next free number is used)
  623.   and the string must not be shorter than 15 characters or longer than 30
  624.   characters. (These may be omitted too.)
  625.   
  626.      Now write your program. Once you are ready, use the CGs to create a
  627.   so-called catalog translation file. (One for any language different than
  628.   the builtin.) In my case (german) this could look like this:
  629.            ; Lines beginning with a semicolon are comment lines.
  630.            ## language deutsch
  631.            ; the catalog language (german)
  632.            ## version $VER: Deutsch.catalog 1.0 (22.12.93)
  633.            ; the catalog files version string
  634.            MSG_Hello
  635.        
  636.            ; Hello, local world
  637.   
  638.   Note the empty line after the message ID. (The arguments of ## language
  639.   and ## version would be missing as well.) You have to fill in the
  640.   german strings here. Again using the CGs you create a catalog file from
  641.   this. Additionally note, that no informations on the strings ID or
  642.   length are behind MSG_Hello.  They are taken from the catalog
  643.   description file.
  644.   
  645.      Once you change the program (adding strings, changing the string
  646.   length) you change the catalog description as well, use the CGs in the
  647.   same way to update the catalog translation and hence the catalogs.
  648.   
  649.   4.9 How to obtain a pointer to a console's window
  650.   =================================================
  651.   
  652.      The following function returns the window pointer of a CON window.
  653.   It can be executed safely under all versions of the Amiga's OS.
  654.   
  655.          struct Window *getConWindowPtr(BPTR fh)
  656.          {
  657.            struct Window *w;
  658.            struct FileHandle *cfh;
  659.            struct StandardPacket *sp;
  660.            struct InfoData *id;
  661.            struct MsgPort *mp;
  662.        
  663.            w = NULL;
  664.        
  665.            if ((cfh = BADDR(fh))->fh_Type != NULL) {
  666.              if (sp = AllocMem(sizeof (struct StandardPacket),
  667.                                MEMF_PUBLIC | MEMF_CLEAR)) {
  668.                if (id = AllocMem(sizeof (struct InfoData),
  669.                                  MEMF_PUBLIC | MEMF_CLEAR)) {
  670.                  if (mp = CreatePort(NULL, 0)) {
  671.                    sp->sp_Msg.mn_Node.ln_Name = (char *) &sp->sp_Pkt;
  672.                    sp->sp_Pkt.dp_Link         = &sp->sp_Msg;
  673.                    sp->sp_Pkt.dp_Port         = mp;
  674.                    sp->sp_Pkt.dp_Type         = ACTION_DISK_INFO;
  675.                    sp->sp_Pkt.dp_Arg1         = MKBADDR(id);
  676.        
  677.                    PutMsg(cfh->fh_Type, &sp->sp_Msg);
  678.                    (void) WaitPort(mp);
  679.                    (void) GetMsg(mp);
  680.        
  681.                    if (sp->sp_Pkt.dp_Res1)
  682.                      w = (struct Window *) id->id_VolumeNode;
  683.        
  684.                    DeletePort(mp);
  685.                  }
  686.                  FreeMem(id, sizeof (struct InfoData));
  687.                }
  688.                FreeMem(sp, sizeof (struct StandardPacket));
  689.              }
  690.            }
  691.        
  692.            return w;
  693.          }
  694.   
  695.      Notes:
  696.      * Accessing a console's window directly may interfere with operations
  697.        performed by the CON handler. Be careful!
  698.   
  699.      * To obtain the window pointer of a CLI's console, pass the
  700.        FileHandle returned by Open("*", MODE_OLDFILE) to the above
  701.        function.
  702.   
  703.      * The result of the above function may well be NULL, e.g. in case of
  704.        an AUX handler or if an AUTO CON handler is unable to open its
  705.        window.
  706.   
  707.      * Sending an ACTION_DISK_INFO packet to an AUTO CON handler (2.0+)
  708.        causes its window to lose its special AUTO properties (i.e. it can
  709.        no longer be closed at any time by clicking on its Close gadget),
  710.        as the window pointer returned in id_VolumeNode must remain valid
  711.        from now on.
  712.   
  713.      * All in all: Don't use this function. :-)
  714.   
  715.      For more information, please refer to pages 273, 276, 435, 463, 485,
  716.   and 629 in "The Amiga Guru Book" (see Manuals).
  717.   
  718.      Ralph Babel, rbabel@babylon.pfm-mainz.de
  719.   
  720.   4.10 What are pragmas?
  721.   ======================
  722.   
  723.      Pragmas are special compiler commmands which control certain
  724.   features of a C-compiler. Two problems arise when using pragmas:
  725.     1. Pragmas are compiler specific. You cannot expect that one compiler
  726.        will understand pragmas of another compiler, even if both run on
  727.        the Amiga.
  728.   
  729.     2. You are not guaranteed that a compiler ignores pragmas, that he
  730.        doesn't understand. Even more: It might not help, to use something
  731.        like this:
  732.                 #ifndef MY_COMPILER
  733.                 #pragma DoAnything
  734.                 #endif
  735.   
  736.   A workaround is to put pragmas in a special include file (BTW, the same
  737.   holds true for statements like #asm (Aztec-C) or #extern (C++) and
  738.   replace the above with
  739.            #ifndef MY_COMPILER
  740.            #include <mypragmas.h>
  741.            #endif
  742.   
  743.      But what do pragmas on the Amiga? The most common usage (not the
  744.   only, but most meant when talking about pragmas) is to tell the
  745.   compiler about how to call library functions: Simple C functions expect
  746.   their arguments on the stack, but library functions want their
  747.   arguments in special processor registers and additionally the `library
  748.   base' in register a6. Lets have a look at a pragma command of the
  749.   Aztec-Compiler.
  750.            #pragma amicall(SysBase,0xd2,FreeMem(a1,d0))
  751.   
  752.   This tells the compiler to put the first argument of FreeMem in register
  753.   a1, the second in register d0 and the value of the variable SysBase in
  754.   register a6. Maxons pragmas look the same, Dice pragmas and SAS pragmas
  755.   look a bit more complicated;
  756.            #pragma libcall SysBase FreeMem d2 0902
  757.   
  758.   Here d2 is (like 0xd2 above) the `library vector offset' (see below),
  759.   the digits 09 are codes for the argument register in reversed order
  760.   (Register codes are 0=d0, 1=d1, .., 8=a0, 9=a1, a=a2, ..), the
  761.   following 0 is the result's registerΣ(always d0))and the final digit 2
  762.   is the number of arguments.
  763.   
  764.      A command `FreeMem(fib,sizeof(*fib);' could produce the following
  765.   code, if the compiler has seen a pragma statement like above:
  766.            move.l  _fib,a1
  767.            move.l  260,d1        ; sizeof(struct FileInfoBlock)
  768.            move.l  _SysBase,a6
  769.            jsr     -0xd2(a6)       ; 0xd2 = _LVOFreeMem
  770.   
  771.   Calling FreeMem in that way is shorter and faster than pushing the
  772.   arguments on the stack, calling a function _FreeMem which would do just
  773.   the same like the above code by pulling the arguments from the stack.
  774.   
  775.      The best way to use pragmas is to include statements like the
  776.   following in your program:
  777.            /*  SAS/C, Dice and GNU-c (since version 2.6.1) make it    */
  778.            /*  very simple:                        */
  779.            #if defined(__SASC)  ||  defined(_DCC)  ||  defined(__GNUC__)
  780.              #include <proto/exec.h>
  781.            #else
  782.        
  783.              /*  Get the prototype for the function; note, that this    */
  784.              /*  is compiler independent.                */
  785.              #include <clib/exec_protos.h>
  786.        
  787.              /*  Get the pragma; compiler dependent, but most pragmas    */
  788.              /*  are in files with the same name.            */
  789.              #ifdef AZTEC_C
  790.                #include <pragmas/exec_lib.h>
  791.              #elif defined(__MAXON__)
  792.                #include <pragmas/exec_pragmas.h>
  793.              #endif
  794.        
  795.              /*  Declare the SysBase variable                */
  796.              extern struct ExecBase *SysBase;
  797.            #endif
  798.   
  799.   The above example can be compiled on all these compilers and produce the
  800.   best code. (Besides, the proto/*.h-files do nothing else than reading
  801.   clib/*_protos.h and pragmas/*_pragmas.h with #include and then declare
  802.   the SysBase variable.)
  803.   
  804.      A final question arises: How to get the pragmas? Most compilers have
  805.   them included. However, sometimes you want to produce pragmas for
  806.   yourself, for example if you are using new libraries or new versions
  807.   with additional functions. In that case you can produce them from the
  808.   so-called `FD' files which should be a part of the developer docs of
  809.   the library. (The NDU has a directory FD which contains FD files for
  810.   all libraries and devices of the OS. see Includes) Most compilers have
  811.   a utility with the name `fd2pragma' or similar included which can do
  812.   that for you. A freely distributable version which can produce pragmas
  813.   for Aztec, Dice, SAS and Maxon as well as LVO files for assembler and
  814.   stub routines for the tag versions is available on Aminet
  815.   (`dev/misc/fd2pragma2_0.lha' and on the Fish CDs.
  816.   
  817.      For pragmas under gcc see Inline Headers.
  818.   
  819.   4.11 My Compiler/Linker is complaining about missing symbol xxx.
  820.   ================================================================
  821.   
  822.      First be sure, that the function is really missing: For example
  823.   floating point functions are in a special link library and you need a
  824.   linker option like `-lm' to include it into your program. Another
  825.   possibility would be that you are using a library function and didn't
  826.   notice it. This might lead to a missing library base, `IntuitionBase'
  827.   for example. In that case just put something like
  828.            struct Library *IntuitionBase;
  829.   
  830.   somewhere in the global part of your program. (Don't forget to call
  831.   OpenLibrary() and CloseLibrary! :-)
  832.   
  833.      However, you could as well use a function which really isn't present
  834.   in your library at all. If you have, for example, an amiga.lib from 2.0
  835.   you would hardly find the locale functions or the pool memory
  836.   functions. (1) Best solution is to get the NDU (see Includes), but you
  837.   probably don't want to wait for it. In that case you have to find what
  838.   kind of function you are missing.
  839.      * Simple library functions (Examples: `exec/AllocPooled',
  840.        `locale/OpenCatalogA') can be called with pragmas. However, you
  841.        need informations on the name of the library base and where to put
  842.        the arguments. See Pragmas.
  843.   
  844.      * Tag functions are mostly just stub functions which call library
  845.        functions. If you have, for example, `dos/AllocDosObject' which
  846.        expects a constant and a pointer to an array of tags, you have the
  847.        varargs version `AllocDosObjectTags' which expects tags on the
  848.        stack as well! Just create the following function:
  849.                 #include <clib/dos_protos.h>
  850.                 #include <pragmas/dos_pragmas.h>    /*  Probably wrong name */
  851.             
  852.                 void *AllocDosObjectTags(ULONG objtype, Tag tag1, ...)
  853.                 { return(AllocDosObject(objtype, (struct TagItem *) &tag1);
  854.                 }
  855.   
  856.      * Some functions still remain: Amiga.lib has some functions which
  857.        are really doing valuable things and not just call a library: The
  858.        BOOPSI functions (`DoMethod', `DoSuperMethod') the memory pool
  859.        functions (`LibAllocPooled', `LibCreatePool', which are
  860.        replacements of 3.0 functions). The only way to replace these is
  861.        to get equivalents. The AmigaFAQ archive contains some of them
  862.        (DoMethod, DoSuperMethod and HookEntry) in the `programmer'
  863.        directory as well as the most common pragma files and some
  864.        examples of varargs functions. See Amiga-FAQ Archive.
  865.   
  866.      ---------- Footnotes ----------
  867.   
  868.      (1)  This problem arises most frequently for owners of Aztec which
  869.   is no longer supported and owners of Dice, which has sometimes rather
  870.   incomplete libraries. I own both ...
  871.   
  872.   4.12 Where do I find the function xxx?
  873.   ======================================
  874.   
  875.      If you are not sure about the name of the appropriate function for a
  876.   certain job or in which library to find it, you can search in these
  877.   places:
  878.      * In the Autodocs for each library you find at the very beginning a
  879.        contents table listing all functions available in this library.
  880.        They are sorted alphabetically, just like in the rest of the
  881.        Autodocs.  In the body part of the Autodocs you find complete
  882.        explanations and specifications for each library function. See
  883.        Includes.
  884.   
  885.      * The .FD files also offer a very compact overview over all functions
  886.        of the diverse libraries, complete with a short information about
  887.        the function arguments. If you already know roughly what you
  888.        search for and e.g. only need the precise order of the arguments,
  889.        you can find all needed information here. See Pragmas.
  890.   
  891.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.com
  892.   
  893.   4.13 The GNU C compiler: general information and installation
  894.   =============================================================
  895.   
  896.      This chapter contains general and installation information about the
  897.   amiga-port of the GNU C compiler gcc.
  898.   
  899.   4.13.1 Current Version
  900.   ----------------------
  901.   
  902.      Gcc current version is now 2.6.0 and 2.6.1 is in work.  It does
  903.   include a new version of ixemul.library, v40.3, but users are urged to
  904.   get ixemul404.lha on Aminet site or my own FTP site, due to errors for
  905.   68000 systems. A new library, libnix, avoid using ixemul.library.
  906.   2.6.1 will include protos, like SAS-C, making SASC ports to GCC easier.
  907.   A new assembler, gas-2.5 is included, a package called q_anote enables
  908.   output of mixing C/Asm code for debugging purposes.  Work is in
  909.   progress to implement stack growing facility, thus avoiding setting
  910.   stack before launching gcc.
  911.   
  912.   4.13.2 Requirements
  913.   -------------------
  914.   
  915.      Any Amiga (ranging from A1000 upto A4000/40) will run amigados-gnu
  916.   utilities. A minimum of 4MB memory is needed in order to compile
  917.   small/medium projects. More memory will be needed for large projects,
  918.   such as recompiling gcc itself, or programming C++. Gigamem and VMM do
  919.   work with GCC so *maybe* less memory will work. But in this case, an
  920.   MMU equipped Amiga (A3000,A4000/40) is necessary.  See 68EC0xx.
  921.   
  922.      A full installation, including C++/ObjC related files, inline
  923.   headers, cbm-headers, (see Includes) roughly requires about 20 MB of HD
  924.   space.
  925.   
  926.      Support for 1.2/1.3 is dropped. If you have 1.2/1.3, get a better
  927.   Kickstart version. Gcc works under KS 1.2/1.3, but the full
  928.   functionality is only available under KS 2.x+. A fast CPU (eg.
  929.   68030@25MHz or better) is also of help.
  930.   
  931.   4.13.3 Authors
  932.   --------------
  933.   
  934.      Gcc and related GNU-software has been ported to the Amiga by the
  935.   following folks: See How to get help.
  936.            Gcc v2.2.2 port:   Markus Wild
  937.            Gcc v2.3.3 port:   Markus Wild
  938.            Gcc v2.4.5 port:   Philippe Brand, Lars Hecking, Fred Fish
  939.            Gcc v2.5.0 and up: Philippe Brand, Fred Fish, Leonard Norrgard
  940.        
  941.            Ixemul.library:    Markus Wild, Leonard Norrgard, R. Luebbert
  942.            Libnix:           Matthias Fleischer, Gunther Nikl
  943.                Gerlib:            Gerhard Mueller
  944.   
  945.   4.13.4 Sources for Gcc
  946.   ----------------------
  947.   
  948.      All GCC sources & binaries are available on:
  949.   
  950.     1. Aminet sites (wuarchive.wustl.edu and mirrors such as ftp.luth.se)
  951.        in /pub/aminet/dev/gcc
  952.   
  953.     2. Ramses The Amiga Flying BBS:
  954.                 +33-1-60037015  HST Dual v32 terbo 4800-21600
  955.                     +33-1-60037713  SupraFax v32bis    4800-14400
  956.                     +33-1-60037716  Tornado v22bis     1200-2400
  957.        in Topic `Development', Area `Gcc' (are 156).
  958.   
  959.      GNU source code is available on:
  960.   
  961.     1. the same FTP site you've taken the binary distribution from
  962.   
  963.     2. gnu.prep.ai.mit.edu (18.71.0.38) in `/pub/gnu'
  964.   
  965.     3. Ramses The Amiga Flying BBS in Topic
  966.        `AmigaUnix/Unix/Linux/NetBSD', Area `Gnu Source Code'
  967.   
  968.      These archives should contain everything necessary to get you going,
  969.   they don't include sources for ixemul.library, which are available on
  970.   Aminet sites in `/pub/aminet/dev/gcc/ixemsrc3947.tar.gz' (as of this
  971.   writing, work is in  progress for the v40 version of ixemul.library,
  972.   sources will be available on an Aminet site near you).
  973.   
  974.      As stated by Richard Stallman of the FSF:
  975.   
  976.      "The GPL says that any distribution of binaries must contain either
  977.   the source code or a written offer to supply source code (see the GPL
  978.   for details of what is required)."
  979.   
  980.   4.13.5 Inline Headers
  981.   ---------------------
  982.   
  983.      The inline headers for gcc can be created from the original CBM fd
  984.   files.  See Includes. See Pragmas. They can be created as follows:
  985.   
  986.        CLI> Assign INCLUDE: GCC:os-include
  987.        CLI> Assign FD: INCLUDE:fd
  988.        CLI> Makedir INCLUDE:inline
  989.        CLI> cd USR:bin/geninline
  990.        CLI> gen31
  991.   
  992.      This will create all inline-headers in `GCC:os-include/inline'.  If
  993.   you have 2.0 headers, use gen20 instead, if you have 3.0, use gen30.
  994.   OS3.1 (rev 40.13) inline headers are included with the current version
  995.   of gcc. See Current Version.
  996.   
  997.      NOTE: perl scripts do not handle correctly AmigaDOS include files,
  998.   which seems to mean they are somewhat broken. This needs some voluntary
  999.   work ...
  1000.   
  1001.      There is also another way of generating inline headers, using
  1002.   fd2inline program:
  1003.   
  1004.        CLI> fd2inline <fd_file> <proto_file>
  1005.   
  1006.   4.13.6 Amiga Libraries
  1007.   ----------------------
  1008.   
  1009.      Starting from this release an AmigaDOS compliant library is provided,
  1010.   thanks to libnix authors (Matthias Fleischer and Gunther Nikl).
  1011.   
  1012.      Anyway if you want to rebuild one, there are two methods:
  1013.   
  1014.      1) Using hunk2gcc; the AmigaDOS object converter made by Markus
  1015.   Wild. To achieve this, simply grab a copy of latest amiga.lib (from
  1016.   Commodore Development Kit, see Includes) and make a new directory where
  1017.   you want your converted object files to go, cd into it, and enter
  1018.   
  1019.            hunk2gcc amiga.lib [..further libs if you like..]
  1020.   
  1021.      This generates an a.out object file for every program unit present
  1022.   in the hunk file (in this case, from amiga.lib).
  1023.   
  1024.      As the final step convert all those files into an a.out style
  1025.   library by issuing:
  1026.   
  1027.            ar qc libamiga.a obj.*
  1028.            ranlib libamiga.a
  1029.   
  1030.      The ranlib run builds a symbol table in the archive, and makes
  1031.   accesses to the library much faster.
  1032.   
  1033.      2) Creating a libamiga.a library with libnix is fairly easy, but
  1034.   takes some time. Just uncompress sources.lha from libnix distribution
  1035.   and run a `make libamiga.a'.
  1036.   
  1037.      *Note:* As long as you make no AmigaDOS specific calls, you can
  1038.   create a dummy library using:
  1039.   
  1040.          cat "int dummy;" >dummy.c
  1041.          gcc -c dummy.c
  1042.          ar crv libamiga.a dummy.o
  1043.          mv libamiga.a gcc:lib
  1044.   
  1045.   4.13.7 Installation
  1046.   -------------------
  1047.   
  1048.     1. If this is your first installation of GCC:
  1049.   
  1050.        Do the following:
  1051.   
  1052.             cd place_with_lot_of_space      ; EDIT! specify one
  1053.             makedir gnu
  1054.             lha x gcc260-base.lha           ; first part, you need it
  1055.   
  1056.        Now you have to append `gnu/s/user-startup' to your
  1057.        `s:user-startup' (replace Devel:GNU by your own gnu path).
  1058.   
  1059.        Continue:
  1060.   
  1061.             execute gnu/s/user-startup      ; makes important assigns
  1062.             copy gnu/envarc/#? ENVARC:
  1063.   
  1064.        *Edit* the following lines!  If you have a 68000 or 68010 Amiga,
  1065.        remove the "-020" from the following lines wherever it appears!
  1066.   
  1067.             lha x gcc260-c-020.lha      ; C-compiler part; you need it
  1068.             lha x gcc260-doc.lha        ; only if you want Gcc documentation
  1069.             lha x gcc260-c++-020.lha    ; only if you want C++
  1070.             lha x gcc260-objc-020.lha   ; only if you want Objective-C
  1071.             lha x gcc260-utils.lha      ; only if you want additional utilities
  1072.                                         ; (recommended for Unix compatibility)
  1073.             lha x gcc260-utilsdoc.lha   ; if you want all utilities documentation
  1074.   
  1075.        You must restore links between some programs by running the script
  1076.        `restorelinks':
  1077.   
  1078.             sh /gnu/s/restorelinks      ; EDIT! Append a " copy" to this line
  1079.                                         ; if you don't want to use makelink
  1080.                                         ; but rather copy file
  1081.   
  1082.        Last part:
  1083.   
  1084.             lha x gcc260-diffs.lha      ; if you want to rebuild all distribution
  1085.             lha x gcc260-texi.lha       ; if you want to build Postscript doc files
  1086.   
  1087.        Now skip to next paragraph and happy compiling!
  1088.   
  1089.     2. If you "upgrade" your gcc environment from v2.5.x, just unarchive
  1090.        first 2 archives as it would normally include all what you need
  1091.        (thus gcc260-base and gcc260-c). Make sure you delete your
  1092.        previous ixemul.library wherever it is (usually LIBS:).
  1093.   
  1094.   
  1095.      *Note*:  new version of ixemul.library is provided, make sure you
  1096.   don't have another copy somewhere which may conflict with gcc.
  1097.   
  1098.   4.13.8 Compiling
  1099.   ----------------
  1100.   
  1101.      What about a nice Hello World ?
  1102.   
  1103.        #include <stdio.h>
  1104.        
  1105.        main()
  1106.        {
  1107.          printf("Hello World!\n");
  1108.        }
  1109.   
  1110.      This was pretty simple ;-) Now we have to compile it.  There's a lot
  1111.   of options in gcc but simplest way to compile this would be:
  1112.   
  1113.        CLI> gcc -o hello hello.c
  1114.   
  1115.      Simple ?
  1116.   
  1117.      Here's more options.
  1118.   
  1119.      Target processor for Motorola family: You can compile plain 68000
  1120.   code, 68020, 68030, 68040, 68881 (have a look at GCC documentation,
  1121.   either in info or AmigaGuide format, chapter `Invoking Gcc/SubModel
  1122.   Options/M680X0 Options for Motorola specific compilation flags').
  1123.   
  1124.        CLI> gcc -m68020 -m68881 -o hello hello.c
  1125.   
  1126.      This will compile your programs using 68020 code and direct calls to
  1127.   math-processor, and will link with accelerated libraries, located in
  1128.   `GCC:lib/lib020'.
  1129.   
  1130.      Optimization: Either you don't want optimization, or you can provide
  1131.   `-O', which will optimize your code, or if you really want top
  1132.   optimization, use `-O2' flag (for more discussion about optimization,
  1133.   read info or AmigaGuide doc chapter Invoking Gcc/Optimize Options).
  1134.   There's now even a `-O3' optimization option, which will go even
  1135.   further.
  1136.   
  1137.        CLI> gcc -O2 -o hello hello.c
  1138.   
  1139.      You'll never have a "Hello World" program running so fast ;-)
  1140.   
  1141.      Code generation: Perhaps you want to generate resident programs.
  1142.   Flag is -resident, at compile and link stage.
  1143.   
  1144.        CLI> gcc -resident -o hello hello.c
  1145.   
  1146.      Of course you can mix all options, resulting in:
  1147.   
  1148.        CLI> gcc -O2 -m68020 -m68881 -resident -o hello hello.c
  1149.   
  1150.      This will make a 68020+68881 executable highly optimized and
  1151.   resident.
  1152.   
  1153.      IMPORTANT: If you only use AmigaDOS functions or you don't want to
  1154.   use ixemul for philosophical reasons, you can get rid of ixemul.library
  1155.   with:
  1156.   
  1157.        CLI> gcc -noixemul -o foobar foobar.c
  1158.   
  1159.      provided you have libnix distribution (included with 2.6.0
  1160.   distribution).
  1161.   
  1162.   4.13.9 How to get help
  1163.   ----------------------
  1164.   
  1165.      The current amiga-gcc-port maintainer is available:
  1166.   
  1167.            Philippe BRAND
  1168.            Fidonet: Ramses The Amiga Flying BBS 2:320/104.21
  1169.            Email:   phb@colombo.telesys-innov.fr (ONLY for personnal email).
  1170.            Ftp:     colombo.telesys-innov.fr:/pub/amigados-gnu
  1171.                     or /pub/incoming/uploads for uploads.
  1172.   
  1173.      There's also an amiga-gcc mailing list running in Finland.  See
  1174.   Mailing lists.  Philippe Brand will forward all questions to that list,
  1175.   but you'd be better off using it directly ;)
  1176.   
  1177.